package com.cyq.day16.game;

public class Soldier extends Hero{
    int atk;
    int hp;
    int def;
    @Override
    public void introduce() {
        super.introduce();
        this.hp=super.level*15;
        this.atk= super.level*2;
        this.def= super.level*3;
        System.out.println("我的职业是士兵");
        System.out.println("我拥有"+hp+"血"+atk+"攻击力"+def+"防御力");
    }

    @Override
    public void skill(Hero h) {
        super.skill(h);
        System.out.println("狂暴");
        this.hp/=2;
        this.atk*=2;
        this.def*=2;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("血量"+this.hp+"攻击力"+this.atk+"防御力"+this.def);
    }
}
